<!DOCTYPE html>
<html>
<head>
    <title>模具维护工单页面</title>
    #parse("sys/header.html")
    <style>
        .ui-jqgrid {
            width: 100%;
            float: right;
        }
        .leftHeight{
            height: 85vh;
            overflow: auto;
        }
        ::-webkit-scrollbar{
            width: 10px;
            height: 10px;
        }
        ::-webkit-scrollbar-thumb{
            border-radius: 10px;
            -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
            background: #a8a5a5;
        }
        .workShops{
            position: absolute;
            top: 0;
            width: 100%;
            height: 25px;
            background-color: white;
        }
        .repairCss{
            display: none;
            margin: 20px;
        }
        .repairCss::-webkit-scrollbar{
            display: none;
        }
        .personnelCss{
            overflow: auto;
            height:200px
        }
        .personnelCss::-webkit-scrollbar{
            /*display: none;*/
            width: 10px;
            height: 10px;
        }
        .personnelSelect{
            margin: 0px 3px 5px 3px;
            /*padding: 0px 3px 3px 3px;*/

        }
        .personnelMari{
            text-align: center;
            width: 90px;
        }
        .inputcss{
            border: 1px solid #E1E1E1;
            padding: 3px;
            min-height: 35px;
        }
    </style>
</head>
<body>
<div id="rrapp" v-cloak>

    <div v-show="showList">
        <Row :gutter="16" style="margin: 8px 0px 0px 1px">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.name" @on-enter="query" placeholder="名称" :clearable="true"></i-input>
                </i-col>
                <i-col span="4">
                    <i-input v-model="q.moduleNo" @on-enter="query" placeholder="模具号" :clearable="true"></i-input>
                </i-col>
                <i-col span="4">
                    <Date-picker :disabled="isDisabled" type="date" v-model="q.beginTime"
                                 placeholder="执行时间起" style="width: 100%"></Date-picker>
                </i-col>
                <i-col span="4">
                    <Date-picker :disabled="isDisabled" type="date" v-model="q.endTime"
                                 placeholder="执行时间止" style="width: 100%"></Date-picker>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
        </Row>
        <Row :gutter="16" style="margin: 3px 0px 0px 0px;">
            <div class="buttons-group">
                <!--<i-button type="warning" @click="addRecord"><Icon type="clipboard"></Icon>&nbsp;记录单填充</i-button>-->
                #if($shiro.hasPermission("modulemaintainplan:assignment"))
                <i-button type="info" @click="assignment"><Icon type="shuffle"></Icon>&nbsp;分派</i-button>
                #end
                #if($shiro.hasPermission("modulemaintainplan:commitApproveReplacePart"))
                <i-button type="info" @click="commit"><i class="fa fa-upload"></i>&nbsp;提交换件审核</i-button>
                #end
                #if($shiro.hasPermission("modulemaintainplan:deptCheckReplacePart"))
                <i-button type="primary" @click="deptCheck"><i class="fa fa-gavel"></i>&nbsp;审核换件</i-button>
                #end
                #if($shiro.hasPermission("modulemaintainplan:isOutTime"))
                <i-button type="warning" @click="isOutTime"><Icon type="clipboard"></Icon>&nbsp;延期申请</i-button>
                #end
                #if($shiro.hasPermission("modulemaintainplan:start"))
                <i-button type="success" @click="start"><Icon type="arrow-right-b"></Icon>&nbsp;开始执行</i-button>
                #end
                #if($shiro.hasPermission("modulemaintainplan:error"))
                <i-button type="error" @click="error"><Icon type="trash-b"></Icon>&nbsp;异常上报</i-button>
                #end
                #if($shiro.hasPermission("modulemaintainplan:dealError"))
                <i-button type="error" @click="dealError"><Icon type="trash-b"></Icon>&nbsp;异常处理</i-button>
                #end
                #if($shiro.hasPermission("modulemaintainplan:end"))
                <i-button type="primary" @click="end"> <Icon type="wrench"></Icon>&nbsp;计划完成</i-button>
                #end
            </div>
        </Row>
        <Row  :gutter="16" style="margin: 8px 0px 0px 1px;">
            <i-col :xs="3" :sm="3" :md="2" :lg="3">
                <div class="leftHeight" >
                    <div class="workShops">
                        <p class="text-center" style="font-size: 15px;">模具类型</p>
                    </div>
                    <div id="storeLayer" style="margin-top: 25px">
                        <ul id="typeTree" class="ztree"></ul>
                    </div>
                </div>
            </i-col>
            <i-col :xs="21" :sm="21" :md="21" :lg="21">
                <table  id="jqGrid"></table>
            </i-col>
        </Row>
        <!-- 审核表单区域 -->
        <div id="reviewLayer" style="padding: 20px;display: none">
            <i-form :model="approveParam" :label-width="80">
                <Form-item label="审核状态：">
                    <Radio-group v-model="approveParam.status">
                        <Radio :label="1"><span>通过</span></Radio>
                        <Radio :label="2"><span>不通过</span></Radio>
                    </Radio-group>
                </Form-item>
                <Form-item label="备注：">
                    <i-input type="textarea" v-model="approveParam.remark" :rows="3" placeholder="请输入..."></i-input>
                </Form-item>
            </i-form>
        </div>
    </div>
    <!-- 派工时维修工列表 -->
    <div id="assignment" class="repairCss" >
        <i-form :label-width="60">
            <Form-item label="维护人员" prop="executor">
                <i-col span="22">
                    <div class="inputcss">
                        <Row type="flex">
                            <div   v-for="(item,index) in mainPersonnel" style="margin-right: 3px;margin-bottom: 3px">
                                <i-col span="24">
                                    <div>
                                        <i-button  type="primary" @click="pointPopup(item,index)">
                                            {{item.name}}
                                            <i class="fa fa-trash-o"></i>
                                        </i-button>
                                    </div>
                                </i-col>
                            </div>
                        </Row>
                    </div>
                </i-col>
            </Form-item>
            <Form-item>
                <div class="personnelCss" >
                    <Row type="flex"  >
                        <div v-for="(item,index) in repairUserList">
                            <i-col span="24">
                                <div class="personnelSelect">
                                    <i-button :type="repairUserList[index].isShow?'primary':''"  size="large" @click="pointPersonnel(item)">
                                        <div class="personnelMari">
                                            {{item.nickName + '(' + item.userName + ')'}}
                                        </div>
                                    </i-button>
                                </div>
                            </i-col>
                        </div>
                    </Row>
                </div>
            </Form-item>
        </i-form>
    </div>
<!--    <div id="assignment" style="display: none">-->
<!--        <i-form :model="dispatchParam" :label-width="80">-->
<!--            <Form-item label="维修人员" prop="repairUser">-->
<!--                <i-col span="11">-->
<!--                    <i-select v-model="dispatchParam.repairUser" class="form-input" >-->
<!--                        <i-option v-for="item in repairUserList" :value="item.userId" :key="item.userId">-->
<!--                            {{item.userName}}   {{item.nickName}}-->
<!--                        </i-option>-->
<!--                    </i-select>-->
<!--                </i-col>-->
<!--            </Form-item>-->
<!--        </i-form>-->
<!--    </div>-->
    <div id="remark_div"  style="display: none;padding: 20px">
        <br/>
        如果是延期计划结束，请录入延期原因！
        <br/>
        <i-input type="textarea" v-model="remark2" placeholder="请输入备注信息"></i-input>
    </div>
    <div id="dealError"  style="display: none;">
        <i-form :model="moduleError" :label-width="100">
            <i-col>
                <Form-item label="处理意见" prop="dealOpinion">
                    <i-input type="textarea" v-model="moduleError.dealOpinion" placeholder="处理意见"></i-input>
                </Form-item>
            </i-col>

        </i-form>
    </div>
</div>

<script src="${rc.contextPath}/js/module/modulePlanWork.js?_${date.systemTime}"></script>
</body>
</html>
